package com.atguigu.springcloud.consumer;

import com.rabbitmq.client.Channel;
import com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.messaging.handler.annotation.Headers;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author : zhenyu
 * @Date : 2022/9/5 17:21
 **/

//简单消费者
@Component
@Slf4j
public class Consumer {

    @RabbitListener(queues = "queue-1")
    public void process(String requestMessage) {
        log.info("消费者收到消息为：" + requestMessage);
    }

}
